#include <func.h>
//堆内存下的fork情况
int main()
{
    pid_t pid;
    char* p=malloc(20);
    strcpy(p,"helloworld");
    pid=fork();
    if(0==pid)
    {
        printf("i am child,num=%s\n",p);
        return 0;
    }else{
        printf("i am parent,,numm=%s\n",p);
        strncpy(p,"HELLO",5);
        printf("i am parent,,numm=%s\n",p);
        sleep(1);
        return 0;
    }
}